from django.urls import path, re_path
from . import views
app_name = 'users'
urlpatterns = [
    path('register/', views.RegisterView.as_view(), name='register'),
    # 判断用户名是否重复注册
    re_path(r'^usernames/(?P<username>[a-zA-Z0-9_-]{2,10})/count/$', views.UsernameCountView.as_view()),
    re_path(r'^mobiles/(?P<mobile>^17\d{9}$)/count/$', views.MobileCountView.as_view()),
    path('login/', views.LoginView.as_view(), name='login'),
    path('logout/', views.LoginoutView.as_view(), name='logout'),
    path('info/', views.UserInfoView.as_view(), name='info'),
    path('list/', views.BookList.as_view(), name='list'),
    # re_path(r'')
]
